package com.csproj.basic.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;


/**
 * 手持机
 * @author Sun
 */
@ApiModel(description = "手持机 @author Sun")
@Entity
@Table(name = "t_base_pda")
public class PDA implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name = "id")
    private String id;

    /**
     * 手持机编号
     */
    @ApiModelProperty(value = "手持机编号")
    @Column(name = "pda_no")
    private String pdaNo;

    /**
     * 是否配充电线
     */
    @ApiModelProperty(value = "是否配充电线")
    @Column(name = "has_charging_line")
    private Boolean hasChargingLine;

    /**
     * 码头Id(Site表中码头类型数据)
     */
    @ApiModelProperty(value = "码头Id(Site表中码头类型数据)")
    @Column(name = "site_id")
    private String siteId;

    /**
     * 启用标志
     */
    @ApiModelProperty(value = "启用标志")
    @Column(name = "enable_flag")
    private Boolean enableFlag;
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    /**
     * 启用原因
     */
    @ApiModelProperty(value = "原因")
    @Column(name = "reason")
    private String reason;
    /**
     * 删除标志
     */
    @ApiModelProperty(value = "删除标志")
    @Column(name = "deleted_flag")
    private Boolean deletedFlag;

    /**
     * 删除人
     */
    @ApiModelProperty(value = "删除人")
    @Column(name = "deleter_user_id")
    private String deleterUserId;

    /**
     * 删除时间
     */
    @ApiModelProperty(value = "删除时间")
    @Column(name = "deletion_time")
    private ZonedDateTime deletionTime;

    /**
     * 最近更新时间
     */
    @ApiModelProperty(value = "最近更新时间")
    @Column(name = "last_modification_time")
    private ZonedDateTime lastModificationTime;

    /**
     * 最近更新人
     */
    @ApiModelProperty(value = "最近更新人")
    @Column(name = "last_modifier_user_id")
    private String lastModifierUserId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "creation_time")
    private ZonedDateTime creationTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Column(name = "creator_user_id")
    private String creatorUserId;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPdaNo() {
        return pdaNo;
    }

    public PDA pdaNo(String pdaNo) {
        this.pdaNo = pdaNo;
        return this;
    }

    public void setPdaNo(String pdaNo) {
        this.pdaNo = pdaNo;
    }

    public Boolean isHasChargingLine() {
        return hasChargingLine;
    }

    public PDA hasChargingLine(Boolean hasChargingLine) {
        this.hasChargingLine = hasChargingLine;
        return this;
    }

    public void setHasChargingLine(Boolean hasChargingLine) {
        this.hasChargingLine = hasChargingLine;
    }

    public String getSiteId() {
        return siteId;
    }

    public PDA siteId(String siteId) {
        this.siteId = siteId;
        return this;
    }

    public void setSiteId(String siteId) {
        this.siteId = siteId;
    }

    public Boolean isEnableFlag() {
        return enableFlag;
    }

    public PDA enableFlag(Boolean enableFlag) {
        this.enableFlag = enableFlag;
        return this;
    }

    public void setEnableFlag(Boolean enableFlag) {
        this.enableFlag = enableFlag;
    }

    public Boolean getEnableFlag(){
        return  this.enableFlag;
    }

    public Boolean isDeletedFlag() {
        return deletedFlag;
    }

    public PDA deletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
        return this;
    }

    public void setDeletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
    }

    public String getDeleterUserId() {
        return deleterUserId;
    }

    public PDA deleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
        return this;
    }

    public void setDeleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
    }

    public ZonedDateTime getDeletionTime() {
        return deletionTime;
    }

    public PDA deletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
        return this;
    }

    public void setDeletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
    }

    public ZonedDateTime getLastModificationTime() {
        return lastModificationTime;
    }

    public PDA lastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
        return this;
    }

    public void setLastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
    }

    public String getLastModifierUserId() {
        return lastModifierUserId;
    }

    public PDA lastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
        return this;
    }

    public void setLastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
    }

    public ZonedDateTime getCreationTime() {
        return creationTime;
    }

    public PDA creationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
        return this;
    }

    public void setCreationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public String getCreatorUserId() {
        return creatorUserId;
    }

    public PDA creatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
        return this;
    }

    public void setCreatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PDA pDA = (PDA) o;
        if (pDA.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), pDA.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "PDA{" +
            "id=" + getId() +
            ", pdaNo='" + getPdaNo() + "'" +
            ", hasChargingLine='" + isHasChargingLine() + "'" +
            ", siteId='" + getSiteId() + "'" +
            ", enableFlag='" + isEnableFlag() + "'" +
            ", deletedFlag='" + isDeletedFlag() + "'" +
            ", deleterUserId='" + getDeleterUserId() + "'" +
            ", deletionTime='" + getDeletionTime() + "'" +
            ", lastModificationTime='" + getLastModificationTime() + "'" +
            ", lastModifierUserId='" + getLastModifierUserId() + "'" +
            ", creationTime='" + getCreationTime() + "'" +
            ", creatorUserId='" + getCreatorUserId() + "'" +
            "}";
    }
}
